package com.ultimatech.feign2.service;

import com.ultimatech.cloud.poc.base.model.TestData;
import com.ultimatech.feign2.service.impl.SchedualServiceHiImpl;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by zhangleping on 2017/9/27.
 */
@FeignClient(value = "service-2", fallback = SchedualServiceHiImpl.class)
public interface ISchedualServiceHi {

    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    String sayHiFromClientOne(@RequestParam(value = "name") String name);

    @RequestMapping(value = "/whoami", method = RequestMethod.GET)
    String whoami(@RequestParam(value = "name") String name);

    @RequestMapping(value = "/test",method = RequestMethod.GET)
    TestData test(@RequestParam(value = "name") String name);

}

